using System;
using InfoTech.Mvc.Core.Models;
using InfoTech.Utilities.Reflection;
using System.ComponentModel.DataAnnotations;
using InfoTech.Mvc.Core.UI.Validation;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace InfoTech.Mvc.LanTranh.MucVu.Models
{
    [Serializable]
    public partial class HOGIADINH_DIACHIModel : ObjModel<HOGIADINH_DIACHI>, IModelConverter
    {

        #region Constructor

        public HOGIADINH_DIACHIModel()
            : base()
        {
        }

        public HOGIADINH_DIACHIModel(HOGIADINH_DIACHI obj)
            : base(obj)
        {
        }

        #endregion

        #region Fields

        private System.Guid _madiachi;

        private System.Guid? _mahogiadinh;

        private System.String _diachi;

        private System.Guid? _maquocgia;

        private System.Guid? _matinhthanh;

        private System.Guid? _maquanhuyen;

        private System.Guid? _maxaphuong;

        private System.Guid? _magiaophan;

        private System.Guid? _magiaohat;

        private System.Guid? _magiaoxu;

        private System.Guid? _magiaoho;

        private System.Int32? _tuthang;

        private System.Int32? _tunam;

        private System.Int32? _denthang;

        private System.Int32? _dennam;

        #endregion

        #region Properties

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid MADIACHI
        {
            get
            {
                return _madiachi;
            }
            set
            {
                _madiachi = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAHOGIADINH
        {
            get
            {
                return _mahogiadinh;
            }
            set
            {
                _mahogiadinh = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        [StringLength(1000, ErrorMessage = "Value must be under 1000 characters")]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.String DIACHI
        {
            get
            {
                return _diachi;
            }
            set
            {
                _diachi = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAQUOCGIA
        {
            get
            {
                return _maquocgia;
            }
            set
            {
                _maquocgia = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MATINHTHANH
        {
            get
            {
                return _matinhthanh;
            }
            set
            {
                _matinhthanh = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAQUANHUYEN
        {
            get
            {
                return _maquanhuyen;
            }
            set
            {
                _maquanhuyen = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAXAPHUONG
        {
            get
            {
                return _maxaphuong;
            }
            set
            {
                _maxaphuong = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAGIAOPHAN
        {
            get
            {
                return _magiaophan;
            }
            set
            {
                _magiaophan = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAGIAOHAT
        {
            get
            {
                return _magiaohat;
            }
            set
            {
                _magiaohat = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAGIAOXU
        {
            get
            {
                return _magiaoxu;
            }
            set
            {
                _magiaoxu = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Guid? MAGIAOHO
        {
            get
            {
                return _magiaoho;
            }
            set
            {
                _magiaoho = value;
            }
        }

        //[Store]
        [Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Int32? TUTHANG
        {
            get
            {
                return _tuthang;
            }
            set
            {
                _tuthang = value;
            }
        }

        //[Store]
        [Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Int32? TUNAM
        {
            get
            {
                return _tunam;
            }
            set
            {
                _tunam = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Int32? DENTHANG
        {
            get
            {
                return _denthang;
            }
            set
            {
                _denthang = value;
            }
        }

        //[Store]
        //[Required(ErrorMessage = "Value is required")]
        //[Range(0, 0, ErrorMessage = "Value must be between 0 and 0")]
        //[StringLength(0)]
        //[EmailRegx]
        //[NumberRegx]
        //[RealNumberRegx]
        //[IntergerRegx]
        //[RealIntergerRegx]
        public System.Int32? DENNAM
        {
            get
            {
                return _dennam;
            }
            set
            {
                _dennam = value;
            }
        }

        #endregion

        #region IModelConverter

        public System.Type Reflector()
        {
            return typeof(HOGIADINH_DIACHIModel);
        }

        public object GetModel()
        {
            return this;
        }

        #endregion

        #region Overrides of Model<HOGIADINH_DIACHI>

        public override void ReverttoModel()
        {
            CreateModel(this);
        }

        public override HOGIADINH_DIACHI ReverttoBussiness()
        {
            return CreateBussiness(this);
        }

        #endregion

        #region Operators

        public static implicit operator HOGIADINH_DIACHIModel(HOGIADINH_DIACHI obj)
        {
            return new HOGIADINH_DIACHIModel(obj);
        }
        public static implicit operator HOGIADINH_DIACHI(HOGIADINH_DIACHIModel obj)
        {
            return obj.ReverttoBussiness();
        }

        #endregion

    }
}
